@echo off
set modname=ModWarfare
color 05
title "=|FF|= Bolts Mod"

:MAKEOPTIONS
cls

:MAKEOPTIONS
echo _________________________________________________________________
echo.
echo  Please select an option:
echo    1. Build Fast File
echo    2. Build IWD File
echo    3. Start Game
echo.
echo    0. Exit
echo.
echo _________________________________________________________________
echo.

set /p make_option=:
set make_option=%make_option:~0,1%
if "%make_option%"=="1" goto build_ff
if "%make_option%"=="2" goto build_iwd
if "%make_option%"=="3" goto STARTGAME
if "%make_option%"=="0" goto FINAL
goto :MAKEOPTIONS



:build_iwd
cls
cd ..\mods\ModWarfare
echo _________________________________________________________________
echo.
echo  Building Bolts iwd:
del z_modwarfare.iwd

7za a -r -tzip z_modwarfare.iwd images
7za a -r -tzip z_modwarfare.iwd weapons

echo.
echo Completed: %time%
echo.
echo _________________________________________________________________
echo.
pause
goto :MAKEOPTIONS




:build_ff
cls
cd ..\mods\ModWarfare
echo _________________________________________________________________
echo.
echo  Building mod.ff:
echo    Deleting old mod.ff file...
del mod.ff

echo    Copying rawfiles...
xcopy ui_mp ..\..\raw\ui_mp /SY
xcopy images ..\..\raw\images /SY
xcopy materials ..\..\raw\materials /SY
xcopy material_properties ..\..\raw\material_properties /SY
xcopy weapons\mp ..\..\raw\weapons\mp /SY
xcopy mod.csv ..\..\zone_source /SY
xcopy english ..\..\raw\english /SY

echo    Copying source code...
xcopy maps ..\..\raw\maps /SY

echo    Copying MOD.CSV...
copy /Y mod.csv ..\..\zone_source
xcopy mod.csv ..\..\zone_source /SY

echo    Compiling mod...

cd ..\..\bin
linker_pc.exe -language english -compress -cleanup mod
cd ..\mods\ModWarfare
copy ..\..\zone\english\mod.ff


echo  New mod.ff file successfully built!
echo.
echo Completed: %time%
echo.
echo _________________________________________________________________
echo.
pause
goto :MAKEOPTIONS




:STARTGAME
cls
echo _________________________________________________________________
echo.
echo Write Map Name:
echo.
set /p make_opt=:
echo.
echo.
echo Map Name: %make_opt%
echo.
echo _________________________________________________________________
echo.
echo.
echo Write Game Type:
echo.
set /p make_optgt=:
echo.
echo.
echo Game Type: %make_optgt%
echo.
echo _________________________________________________________________
echo.
cd ..\..\
START iw3mp.exe +g_gametype %make_optgt% +set fs_game mods/%modname% +developer 2 +devmap %make_opt%
cd ..\mods\ModWarfare
pause
goto :MAKEOPTIONS
:FINAL